1. Field of the Invention
The present invention relates to an apparatus and a method for processing color images and, more particularly, to a color image processing apparatus having a function of replacing a particular color in an original with a different color and a color image processing method using such a function.
2. Description of the Related Art
FIG. 6 shows a conventional color image processing apparatus.
Three color image signals R (red), G (green) and B (blue) representing an image are converted into an intensity signal I, a hue signal H and a saturation signal S by a matrix calculation in a coordinate transformation section 61. Comparators 62a to 62f compare the three signals with the intensity, hue and saturation, respectively, of a color set as a color to be converted. The color of the image represented by the signals is regarded as the “color to be converted”. A selector 63 replaces the color of the image with a “color after conversion” if the comparison result is that the difference of each signal from the corresponding value of the set color is not larger than a predetermined value. The selector 63 outputs the unchanged original color if any one of the signals is largely different from the predetermined value.
In the above-described conventional image processing apparatus, colors before and after conversion are changed according to binary information as to whether a color of an original corresponds to a “color to be converted”. Therefore, in a portion close to the boundary of the converted color, the colors before and after conversion may remain as mottles or speckles because of chattering due to reading non-uniformity or the like, resulting in a considerable deterioration in image quality.
Functions for converting colors of images include color conversion processing for converting a particular color of an original color image into a different color, monochromatic conversion processing for converting an image having a plurality of colors into a monochromatic image of a selected single color, color balance adjustment, and posterization for forming a poster-like image by reducing the number of colors of an image. In a color processing system, these kinds of processing can be practiced using independent circuits.
Regarding color conversion processing for changing a particular color in an original color image into a different color, a method described below is known as a method of discriminating a particular color. It is possible to identify the color of pixels by determining whether the ratios of red signal R, green signal G and blue signal B coincide with a range of predetermined ratios. For example, the largest one of R1, G1 and B1 is selected as a maximum value M1 to obtain the ratios of the other two values to M1. Then, if the following inequalities are satisfied, it is determined that the corresponding pixel has the same color as the particular color to be converted. For example, with respect to input pixel signals (R, G, B), if M1=R1,R×(G/M1)×α1≦G≦R×(G/M1)×α2 R×(B/M1)×β1≦B≦R×(B/M1)×β2  M1×Γ1≦R≦M1×γ2
Each of α1, β1 and γ1 is a value equal to or smaller than 1, and each of α2, β2 and γ2 is a value equal to or larger than 1. Color identification allowances are determined by selecting these set values. If all the pixels whose colors are identified as the particular color are replaced with the color (R2, G2, B2), a color-converted image having a solid density is obtained.
It is also possible to convert a particular color while maintaining its gradation in such a manner that the largest one of R2, G2 and B2 (e.g., M2=G2) is selected to obtain the ratios of the other two values to the maximum value M2. This can be done by setting the R value to (M1×(R2/M2)), the G value to M1, and the B value to (M1×(B2/M2)).
Monochromatic conversion processing for converting an image having a plurality of colors into a monochromatic image of a selected single color is performed as described below. A designated color (R1, G1, B1) is converted into density signals (C1(cyan), M1 (magenta), and Y1 (yellow) and Bk1 (black)), and a maximum value MX in these values is stored. A signal ND (neutral density) representing a density is calculated by the following equation from density signals (C, M, Y) converted from input image signals (R, G, B). That is,ND=(C+M+Y)/3. 
For example, if MX=C1, then the density (C0, M0, Y0, Bk0) of a target pixel which is presently processed is calculated by the following equations:C0=ND×MX M0=ND×(M1/MX) Y0=ND×(Y1/MX) Bk0=ND×(Bk1/MX). 
Thus, it possible to change the density of an image while maintaining the same color.
Color balance adjustment for adjusting a color tone is performed in such a manner that different gain offsets set with respect to necessary colors are added to correction coefficients provided in an F correction table with respect to the colors which are used to adjust the tone of color when the colors are superposed.
For posterization, the lower 6 bits of each of R, G and B input signals, for example, are fixed to set four gradations for each color. In this case, it is possible to obtain a limited color image of 64 colors.
Conventionally, the above-described functions are performed by separate circuits. Therefore, the circuit scale and the manufacturing cost of the processing apparatus are increased if the number of functions is increased.
In a case where an ordinary user performs color balance adjustment, there is a need to convert, for example, an (R, G, B) system into a (C, M, Y, Bk) system and to perform adjustment operations with respect to each color component. For intuitive adjustment satisfying a demand for a “lighter”, “slightly bluish” tone or the like, long experience and a great deal of skill are required.
There are two kinds of color adjustment processing: one in which an amount of change is set with respect to a particular color on an original selected as a color to be modified, and the selected particular color is modified by the set amount, and one in which all colors on the entire original surface are selected to be modified and are changed by equal amounts on a hue circle. However, no conventional color image processing system has both of these two kinds of adjustment processing.
In the case of color conversion processing on input color image data read from a halftone dot image formed by a color copying machine or the like, if the input color image data and a color to be converted are simply converted, and if the color is examined with respect to each pixel of the image, each pixel formed of non-superposed color dots cannot be determined as that same color as the color to be converted even if its color can be visually perceived as the same color. This is because of the specific formation of the halftone dot image in which constellations of dots having a plurality of colors are superposed in a staggered manner, resulting in failure to achieve accurate color conversion.
To solve this problem, a color conversion method has recently been practiced in which image data obtained by filtering an input color image read from a halftone dot image is used for determination of a color as a color to be converted.
In this conventional method, however, a filter used for such filtering is fixed and, therefore, image data after filtering, which is used for color identification, is limited to one set. Therefore, the image after color conversion cannot always be the same as the desired image imaged by an operator, and the converted color cannot be modified.
Moreover, since a uniform filter is used regardless of the number of lines of dots, there is a possibility of the accuracy of the image after filtering being reduced to such an extent that color identification cannot be made with the desired fidelity.